package com.my.bo;

import java.math.BigInteger;
import java.util.List;

import com.my.bean.Admin;
import com.my.bean.Role;
import com.my.bean.User;

public interface AccountBo {

	/***************************************** user ***************************************************************************/

	boolean addUser(User user) throws Exception;

	boolean editUser(User user) throws Exception;

	User getUserById(Class<User> c, Integer id) throws Exception;

	BigInteger getTotalUserRecords() throws Exception;

	List<User> getAllUserByPage(int pageindex, int pagesize) throws Exception;

	boolean removeUser(Integer id) throws Exception;

	public BigInteger searchTotalUserRecords(User user) throws Exception;

	List<User> searchUserByPage(int pageindex, int pagesize, User user)
			throws Exception;

	/********************************** Admin *****************************************/
	Admin checkLoginAdmin(Admin admin);

	boolean isExistAdmin(String name);

	boolean addAdmin(Admin admin) throws Exception;

	boolean editAdmin(Admin admin) throws Exception;

	Admin getAdminById(Class<Admin> c, Integer id) throws Exception;

	BigInteger getTotalAdminRecords() throws Exception;

	List<Admin> getAllAdminByPage(int pageindex, int pagesize) throws Exception;

	boolean removeAdmin(Integer id) throws Exception;

	public BigInteger searchTotalAdminRecords(Admin admin) throws Exception;

	List<Admin> searchAdminByPage(int pageindex, int pagesize, Admin admin)
			throws Exception;

	/********************************** Role *****************************************/
	List<Role> getRoleList() throws Exception;
}
